home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
util
/
gnu
/
textutils_1_3.LHA
/
textutils-1.3
/
cat
/
nl.1
< prev
next >
Wrap
Text File
|
1992-09-22
|
5KB
|
199 lines
NL(1L) MISC. REFERENCE MANUAL PAGES NL(1L)
NAME
nl - number lines of files
SYNOPSIS
nl [-h header-style] [-b body-style] [-f footer-style] [-p]
[-d cc] [-v start-number] [-i increment] [-l lines] [-s
line-separator] [-w line-no-width] [-n {ln,rn,rz}]
[--header-numbering=style] [--body-numbering=style]
[--footer-numbering=style] [--first-page=number] [--page-
increment=number] [--no-renumber] [--join-blank-
lines=number] [--number-separator=string] [--number-
width=number] [--number-format={ln,rn,rz}] [--section-
delimiter=cc] [file...]
DESCRIPTION
This manual page documents the GNU version of nl. nl copies
each given file, or the standard input if none are given or
when a file named `-' is given, to the standard output, with
line numbers added to some or all of the lines.
nl considers its input to be composed of logical pages; by
default, the line number is reset to 1 at the top of each
logical page. nl treats all of the input files as a single
document; it does not reset line numbers or logical pages
between files.
A logical page consists of three sections: header, body, and
footer. Any of the sections can be empty. Each can be num-
bered in a different style from the others.
The beginnings of the sections of logical pages are indi-
cated in the input file by a line containing nothing except
one of the delimeter strings shown below:
\:\:\: start of header
\:\: start of body
\: start of footer
The two characters from which these strings are made can be
changed with an option (see below), but the pattern and
length of each string cannot be changed.
The section delimiter strings are replaced by an empty line
on output. Any text that comes before the first section
delimiter string in the input file is considered to be part
of a body section, so a file that does not contain any sec-
tion delimiter strings is considered to consist of a single
body section.
OPTIONS
-_h, --_h_e_a_d_e_r-_n_u_m_b_e_r_i_n_g=_s_t_y_l_e
See --footer-numbering.
Sun Release 4.1 Last change: 1
NL(1L) MISC. REFERENCE MANUAL PAGES NL(1L)
-_b, --_b_o_d_y-_n_u_m_b_e_r_i_n_g=_s_t_y_l_e
See --footer-numbering.
-_f, --_f_o_o_t_e_r-_n_u_m_b_e_r_i_n_g=_s_t_y_l_e
Select the numbering style for lines in the footer sec-
tion of each logical page. When a line is not num-
bered, the current line number is not incremented, but
the line number separator character is still prepended
to the line. The styles are:
a number all lines
t number only nonempty lines (default for body)
n number no lines (default for header and footer)
p_r_e_g_e_x_p
number only lines that contain a match for _r_e_g_e_x_p
-_p, --_n_o-_r_e_n_u_m_b_e_r
Do not reset the line number at the start of a logical
page.
-_v, --_f_i_r_s_t-_p_a_g_e=_n_u_m_b_e_r
Set the initial line number on each logical page to
_n_u_m_b_e_r (default 1).
-_i, --_p_a_g_e-_i_n_c_r_e_m_e_n_t=_n_u_m_b_e_r
Increment line numbers by _n_u_m_b_e_r (default 1).
-_l, --_j_o_i_n-_b_l_a_n_k-_l_i_n_e_s=_n_u_m_b_e_r
Consider _n_u_m_b_e_r (default 1) consecutive empty lines to
be one logical line for numbering, and only number the
last one. Where fewer than _n_u_m_b_e_r consecutive empty
lines occur, do not number them. An empty line is one
that contains no characters, not even spaces or tabs.
-_s, --_n_u_m_b_e_r-_s_e_p_a_r_a_t_o_r=_s_t_r_i_n_g
Separate the line number from the text line in the out-
put with _s_t_r_i_n_g (default is a TAB character).
-_w, --_n_u_m_b_e_r-_w_i_d_t_h=_n_u_m_b_e_r
Use _n_u_m_b_e_r characters for line numbers (default 6).
-_n, --_n_u_m_b_e_r-_f_o_r_m_a_t={_l_n,_r_n,_r_z}
Select the line numbering format:
ln left justified, no leading zeros
rn right justified, no leading zeros (default)
rz right justified, leading zeros
Sun Release 4.1 Last change: 2
NL(1L) MISC. REFERENCE MANUAL PAGES NL(1L)
-_d, --_s_e_c_t_i_o_n-_d_e_l_i_m_i_t_e_r=_c_c
Set the two delimeter characters that indicate the
beginnings of logical page sections; if only one is
given, the second remains ':'. To enter '\', use '\\'.
The long-named options can be introduced with `+' as well as
`--', for compatibility with previous releases. Eventually
support for `+' will be removed, because it is incompatible
with the POSIX.2 standard.
Sun Release 4.1 Last change: 3